import js from '@eslint/js'
import pluginVue from 'eslint-plugin-vue'
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'

export default [
	{
		name: 'app/files-to-lint',
		files: ['**/*.{js,mjs,jsx,vue}'],
		languageOptions: {
			globals: {
				uni: 'readonly',
				CozeWebSDK: 'readonly'
			}
		}
	},
	{
		name: 'app/files-to-ignore',
		ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**', '**/globals.js', '**/src/uni_modules/**']
	},
	js.configs.recommended,
	...pluginVue.configs['flat/essential'],
	skipFormatting,
	{
		rules: {
			'no-multiple-empty-lines': [
				'error',
				{
					max: 1
				}
			],
			'vue/multi-word-component-names': 'off',
			'no-unused-vars': ['warn'],
			'vue/no-v-text-v-html-on-component': 'off'
		}
	}
]
